import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/layout/index.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      { path: '/home', component: () => import('../views/Home.vue'), },
      { path: '/list', component: () => import('../views/Music.vue'), },
      { path: '/play/:id', component: () => import('../views/PlayM.vue'), },

    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
